<?php
/* @var \common\models\Goods $model */
use frontend\assets\SwiperAsset;
use yii\helpers\Html;

SwiperAsset::register($this);

?>
<div id="g-show" class="container">
    <div class="top clearfix">
        <div class="img">

                <?php
                $slideContent = '';
                $slideLi = '';
                foreach($model->attachments as $k => $v) {
                    $slideContent .= Html::tag('div', '', ['class' => 'swiper-slide', 'style' =>'background-image:url('.$v['base_url'].'/'.$v['path'].')']);
                }
                ?>

                <div class="swiper-container gallery-top">
                    <div class="swiper-wrapper">
                        <?= $slideContent ?>
                    </div>
                </div>
                <div class="gallery-thumbs-bg"></div>
                <div class="swiper-container gallery-thumbs">
                    <div class="swiper-wrapper">
                        <?= $slideContent ?>
                    </div>
                </div>

        </div>
        <div class="desc">
            <span class="dib t1"><?= $model->name ?></span>
            <span class="dib t2">[<?= $model->hotel->hotel_type ?>]</span><br />
            <span class="dib t2">朝阳区 东直门外斜街 <a href="#">地图</a></span><br />
                <span class="dib t3">
                    <i class="act"></i><i class="act"></i><i class="act"></i><i></i><i></i>
                    <em>4.8</em>分 (满分10分)
                </span><br />
            <span class="t2">100%场地推荐 - <em>2</em> 条推荐</span><br />
            <span class="t2">近期被预定 - <em>9</em> 场</span><br />
            <span class="t2 t5"><?= $model->acreage ?>㎡/<?= $model->size['length'] ?>x<?= $model->size['width'] ?>x<?= $model->size['height'] ?>m/可容纳<?= $model->accommodate ?>人 <a href="#">哪天有档期</a></span><br />
                <span class="t4">
                    参考价：<br />
                    <b>￥<?= $model->price ?></b> <?= Html::a('立即邀请报价', ['/']) ?>
                </span>
            <dl class="clearfix">
                <dt><img src="/temp/r-4.gif"></dt>
                <dd>
                    <b>Klbo</b> 酒店销售主管<br />
                    管理公司 - 北京香格里拉酒店<br />
                    <a href="#" class="dib">在线咨询</a>
                    <a href="#" class="dib">联系电话</a><br />
                </dd>
            </dl>
        </div>
    </div>
    <div class="tlist">
        <fieldset class="clearfix">
            <small><i>46分</i> 前有人预定 | 近期预定 <i>112场</i></small>
        </fieldset>

        <table id="j-tbl-list2">
            <tr>
                <td class="wt1">限时特价<span class="dib">特价</span></td>
                <td class="wt2"><a href="#">套餐详情</a></td>
                <td class="wt2"><a href="#">附加服务</a></td>
                <td class="wt3">20%订金</td>
                <td class="wt3">500人</td>
                <td><a href="#" class="btn">立即预订</a></td>
            </tr>
            <tr class="bg">
                <td class="wt1">含早午自助餐<span class="dib">特价</span></td>
                <td class="wt2"><a href="#">套餐详情</a></td>
                <td class="wt2"><a href="#">附加服务</a></td>
                <td class="wt3">20%订金</td>
                <td class="wt3">500人</td>
                <td><a href="#" class="btn">立即预订</a></td>
            </tr>
            <tr>
                <td class="wt1">限时特价<span class="dib">特价</span></td>
                <td class="wt2"><a href="#">套餐详情</a></td>
                <td class="wt2"><a href="#">附加服务</a></td>
                <td class="wt3">20%订金</td>
                <td class="wt3">500人</td>
                <td><a href="#" class="btn">立即预订</a></td>
            </tr>
            <tr class="bg">
                <td class="wt1">含早午自助餐<span class="dib">特价</span></td>
                <td class="wt2"><a href="#">套餐详情</a></td>
                <td class="wt2"><a href="#">附加服务</a></td>
                <td class="wt3">20%订金</td>
                <td class="wt3">500人</td>
                <td><a href="#" class="btn">立即预订</a></td>
            </tr>
            <tr>
                <td class="wt1">限时特价</td>
                <td class="wt2"><a href="#">套餐详情</a></td>
                <td class="wt2"><a href="#">附加服务</a></td>
                <td class="wt3">20%订金</td>
                <td class="wt3">500人</td>
                <td><a href="#" class="btn">立即预订</a></td>
            </tr>
            <tr class="bg">
                <td class="wt1">含早午自助餐<span class="dib">特价</span></td>
                <td class="wt2"><a href="#">套餐详情</a></td>
                <td class="wt2"><a href="#">附加服务</a></td>
                <td class="wt3">20%订金</td>
                <td class="wt3">500人</td>
                <td><a href="#" class="btn">立即预订</a></td>
            </tr>
        </table>
        <h3 id="j-tbl-switch2"><em class="dib down">收起不可订产品</em></h3>

    </div>
    <div class="dlist">
        <h4 class="tab-t clearfix" id="j-tab-t">
            <span class="act">酒店位置</span>
            <span>日程安排</span>
            <span>套餐说明</span>
            <span>费用说明</span>
            <span>注意事项</span>
            <span>预定须知</span>
            <span>参考信息</span>
            <em>￥140000</em>
            <a href="#">立即邀请报价</a>
        </h4>
        <div class="tab-c" id="j-tab-c">
            <table width="100%">
                <?php foreach($model->goodsAttributes as $k => $v):?>
                    <tr>
                        <th><?= $v->attr->name ?>：</th>
                        <td><?= implode('、', $v->value); ?></td>
                    </tr>
                <?php endforeach;?>
                <tr class="last">
                    <th>酒店描述：</th>
                    <td>
                        <?= $model->hotel->description?>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>

<?php
$js = <<<JS
var galleryTop = new Swiper('.gallery-top', {
    nextButton: '.swiper-button-next',
    prevButton: '.swiper-button-prev',
    spaceBetween: 10,
    loop:true,
    loopedSlides: 5, //looped slides should be the same
});
var galleryThumbs = new Swiper('.gallery-thumbs', {
    spaceBetween: 10,
    slidesPerView: 4,
    touchRatio: 0.2,
    loop:true,
    loopedSlides: 5, //looped slides should be the same
    slideToClickedSlide: true
});
galleryTop.params.control = galleryThumbs;
galleryThumbs.params.control = galleryTop;
JS;
$this->registerJs($js);
